package com.bw.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bw.domain.TraceTransport;
import com.bw.mapper.TraceUserCropsMapper;
import com.bw.service.TraceTransportService;
import com.bw.mapper.TraceTransportMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author xiaoabiao
* @description 针对表【trace_transport】的数据库操作Service实现
* @createDate 2023-08-21 09:27:54
*/
@Service
public class TraceTransportServiceImpl extends ServiceImpl<TraceTransportMapper, TraceTransport>
    implements TraceTransportService{
        @Autowired
    TraceUserCropsMapper traceUserCropsMapper;
        @Autowired
        TraceTransportMapper traceTransportMapper;

    @Override
    public int addTrasport(TraceTransport traceTransport) {
        //根据 作物编号 修改状态为 已出售
        traceUserCropsMapper.updateByCropsId(traceTransport.getCropsId());
        return traceTransportMapper.addTrasport(traceTransport);
    }




}




